<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Redimensionando un array</title>
</head>
<body>

<h1>Redimensionando un array</h1>

<script type="text/vbscript">

dim semana()
redim semana(6)

semana(0) = "Lunes"
semana(1) = "Martes"
semana(2) = "Miercoles"
semana(3) = "Jueves"
semana(4) = "Viernes"
semana(5) = "Sabado"
semana(6) = "Domingo"

'Mostramos todos los dias de la semana
document.write("Dias de la semana<br>")
for x=0 to UBound(semana)
  document.write (semana(x) & " ")
next

'Recortamos el array
redim preserve semana(4)

'Mostramos los dias de diario
document.write("<br>Dias de diario<br>")
for x=0 to UBound(semana)
  document.write (semana(x) & " ")
next

</script>

<br><br>
<hr>
Art&iacute;culo disponible en: <a href="http://lineadecodigo.com/2008/02/08/redimensionar-un-array-con-vbscript/">http://lineadecodigo.com/2008/02/08/redimensionar-un-array-con-vbscript/</a><br/>
<a href="http://lineadecodigo.com" title="Linea de Codigo">lineadecodigo.com</a>


</body>
</html>